package com.qf.shopback;

//
//public class Singleton1 {
//    private  static Singleton1 singleton= new Singleton1();

//
//    private Singleton1(){}
//
//    public  static  Singleton1 getInstance(){
//        return  singleton;
//    }


class Singleton3 {
    private static Singleton3 singleton3;

    private Singleton3() {

    }

    public static Singleton3 getInstance3() {
        if (singleton3 == null) {
            synchronized (Singleton3.class){
                if (singleton3==null){
                    singleton3=new Singleton3();
                }
            }
        }
        return singleton3;
    }

}


